<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理员组列表-添加管理员组</title>
<link href="/rating/Public/admin/css/style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="/rating/Public/admin/js/jquery.js"></script>

<link href="/rating/Public/validform/Validform.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/rating/Public/validform/Validform_v5.3.2.js"></script>
<script type="text/javascript" src="/rating/Public/validform/Validform_Datatype.js"></script>
<style>
#menuinfo {margin-left: 86px;}
#menuinfo label{width: 130px;}
#schoolinfo {margin-left: 86px;}
#schoolinfo label{width: 30%;}
</style>
</head>

<body>

	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a href="<?php echo U('index/welcome');?>">首页</a></li>
			<li><a href="<?php echo U('admingroup/index');?>">管理员组列表</a></li>
			<li><a href="#">添加管理员组</a></li>
		</ul>
    </div>
    
    <div class="formbody">
    
		<div class="formtitle"><span>添加管理员组</span></div>

		<form name="myform" id="myform" action="<?php echo U('admingroup/addadmingroup');?>" method="post">
			<ul class="forminfo">
				<li><label>管理员组名</label><input name="info[group_name]" id="group_name" type="text" class="dfinput" datatype="/^[\u4E00-\u9FA5\uf900-\ufa2d]{2,8}$/" errormsg="组名范围在2~8位之间，汉字！" maxlength="10" value="" /></li>
				<li><label>菜单权限</label>
					<div id="menuinfo">
					<?php if(is_array($menuinfo)): $i = 0; $__LIST__ = $menuinfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$menu): $mod = ($i % 2 );++$i;?><!--顶部菜单-->
						<label style="width:100%;font-weight: bold;"><input name="info[menu_id][]" type="checkbox" value="<?php echo ($menu["menu_id"]); ?>" /><?php echo ($menu["menu_title"]); ?></label><br>
						<?php if(is_array($menu['child'])): $i = 0; $__LIST__ = $menu['child'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$child): $mod = ($i % 2 );++$i;?><label style="width:100%;margin-left:86px;">
								<!--左侧一级菜单-->
								<label><input name="info[menu_id][]" type="checkbox" value="<?php echo ($child["menu_id"]); ?>" /><?php echo ($child["menu_title"]); ?></label>
								<?php if(is_array($child['child'])): $i = 0; $__LIST__ = $child['child'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$child_): $mod = ($i % 2 );++$i;?><!--左侧二级菜单/操作菜单-->
								<label style="color:#3DABEC;"><input name="info[menu_id][]" type="checkbox" value="<?php echo ($child_["menu_id"]); ?>" /><?php echo ($child_["menu_title"]); ?></label><?php endforeach; endif; else: echo "" ;endif; ?><br>
							</label><?php endforeach; endif; else: echo "" ;endif; endforeach; endif; else: echo "" ;endif; ?>
					</div>
					<i class="Validform_checktip"></i>
				</li>

				<li><label>&nbsp;</label><input name="loginbtn" type="submit" class="btn" value="确认保存"/></li>
			</ul>
		</form>
    
    </div>

	<script>
	$(function(){
		$("#myform").Validform({
			//tiptype:2
			tiptype:function(msg,o,cssctl){
				var objtip=o.obj.siblings(".Validform_checktip");
				cssctl(objtip,o.type);
				objtip.text(msg);
			}
		});
	}); 
	</script>
</body>

</html>